import Vue from 'vue'
import VueRouter from 'vue-router'
import { RouteConfig } from 'vue-router';
// 在创建 router 实例后添加这段代码


Vue.use(VueRouter);

const routes : Array<RouteConfig> = [
	{
		path: '/',
		name: 'index',
		component: () => import('@/views/index.vue')
	},
	{
		path: '/calculation',
		name: 'calculation',
		component: () => import('@/views/calculation.vue')
	},
	{
		path: '/item',
		name: 'Item',
		component: () => import('@/views/item.vue'),
	},
	{
		path: '/build',
		name: 'Build',
		component: () => import('@/views/build.vue'),
	},
	{
		path: '/recipe',
		name: 'Recipe',
		component: () => import('@/views/recipe.vue'),
	},
	{
		path: '/item/info',
		name: "ItemInfo",
		component: () => import('@/views/itemInfo.vue'),
	},
	{
		path: '/build/info',
		name: "BuildInfo",
		component: () => import('@/views/buildInfo.vue'),
	}
];

const router = new VueRouter({
	routes
})

export default router